<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Module: Origami::ResourcesHolder</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Module</strong></td>
          <td class="class-name-in-header">Origami::ResourcesHolder</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../files/origami/page_rb.html">
                origami/page.rb
                </a>
        <br />
            </td>
        </tr>

        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">



   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000287">add_colorspace</a>&nbsp;&nbsp;
      <a href="#M000286">add_extgstate</a>&nbsp;&nbsp;
      <a href="#M000291">add_font</a>&nbsp;&nbsp;
      <a href="#M000288">add_pattern</a>&nbsp;&nbsp;
      <a href="#M000292">add_properties</a>&nbsp;&nbsp;
      <a href="#M000289">add_shading</a>&nbsp;&nbsp;
      <a href="#M000290">add_xobject</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">





      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000287" class="method-detail">
        <a name="M000287"></a>

        <div class="method-heading">
          <a href="#M000287" class="method-signature">
          <span class="method-name">add_colorspace</span><span class="method-args">(name, colorspace)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000287-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000287-source">
<pre>
    <span class="ruby-comment cmt"># File origami/page.rb, line 79</span>
79:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_colorspace</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">colorspace</span>)
80:       <span class="ruby-identifier">target</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Resources</span>) <span class="ruby-operator">?</span> <span class="ruby-keyword kw">self</span> <span class="ruby-operator">:</span> (<span class="ruby-keyword kw">self</span>.<span class="ruby-constant">Resources</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Resources</span>.<span class="ruby-identifier">new</span>)
81: 
82:       <span class="ruby-identifier">target</span>.<span class="ruby-constant">ColorSpace</span> <span class="ruby-operator">||=</span> {}
83:       <span class="ruby-identifier">target</span>.<span class="ruby-constant">ColorSpace</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">colorspace</span>
84:     
85:       <span class="ruby-keyword kw">self</span>
86:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000286" class="method-detail">
        <a name="M000286"></a>

        <div class="method-heading">
          <a href="#M000286" class="method-signature">
          <span class="method-name">add_extgstate</span><span class="method-args">(name, extgstate)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000286-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000286-source">
<pre>
    <span class="ruby-comment cmt"># File origami/page.rb, line 70</span>
70:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_extgstate</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">extgstate</span>)
71:       <span class="ruby-identifier">target</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Resources</span>) <span class="ruby-operator">?</span> <span class="ruby-keyword kw">self</span> <span class="ruby-operator">:</span> (<span class="ruby-keyword kw">self</span>.<span class="ruby-constant">Resources</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Resources</span>.<span class="ruby-identifier">new</span>)
72: 
73:       <span class="ruby-identifier">target</span>.<span class="ruby-constant">ExtGState</span> <span class="ruby-operator">||=</span> {}
74:       <span class="ruby-identifier">target</span>.<span class="ruby-constant">ExtGState</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">extgstate</span>
75: 
76:       <span class="ruby-keyword kw">self</span>
77:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000291" class="method-detail">
        <a name="M000291"></a>

        <div class="method-heading">
          <a href="#M000291" class="method-signature">
          <span class="method-name">add_font</span><span class="method-args">(name, font)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000291-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000291-source">
<pre>
     <span class="ruby-comment cmt"># File origami/page.rb, line 115</span>
115:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_font</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">font</span>)
116:       <span class="ruby-identifier">target</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Resources</span>) <span class="ruby-operator">?</span> <span class="ruby-keyword kw">self</span> <span class="ruby-operator">:</span> (<span class="ruby-keyword kw">self</span>.<span class="ruby-constant">Resources</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Resources</span>.<span class="ruby-identifier">new</span>)
117: 
118:       <span class="ruby-identifier">target</span>.<span class="ruby-constant">Font</span> <span class="ruby-operator">||=</span> {}
119:       <span class="ruby-identifier">target</span>.<span class="ruby-constant">Font</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">font</span>
120:     
121:       <span class="ruby-keyword kw">self</span>
122:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000288" class="method-detail">
        <a name="M000288"></a>

        <div class="method-heading">
          <a href="#M000288" class="method-signature">
          <span class="method-name">add_pattern</span><span class="method-args">(name, pattern)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000288-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000288-source">
<pre>
    <span class="ruby-comment cmt"># File origami/page.rb, line 88</span>
88:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_pattern</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">pattern</span>)
89:       <span class="ruby-identifier">target</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Resources</span>) <span class="ruby-operator">?</span> <span class="ruby-keyword kw">self</span> <span class="ruby-operator">:</span> (<span class="ruby-keyword kw">self</span>.<span class="ruby-constant">Resources</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Resources</span>.<span class="ruby-identifier">new</span>)
90: 
91:       <span class="ruby-identifier">target</span>.<span class="ruby-constant">Pattern</span> <span class="ruby-operator">||=</span> {}
92:       <span class="ruby-identifier">target</span>.<span class="ruby-constant">Pattern</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">pattern</span>
93:     
94:       <span class="ruby-keyword kw">self</span>
95:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000292" class="method-detail">
        <a name="M000292"></a>

        <div class="method-heading">
          <a href="#M000292" class="method-signature">
          <span class="method-name">add_properties</span><span class="method-args">(name, properties)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000292-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000292-source">
<pre>
     <span class="ruby-comment cmt"># File origami/page.rb, line 124</span>
124:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_properties</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">properties</span>)
125:       <span class="ruby-identifier">target</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Resources</span>) <span class="ruby-operator">?</span> <span class="ruby-keyword kw">self</span> <span class="ruby-operator">:</span> (<span class="ruby-keyword kw">self</span>.<span class="ruby-constant">Resources</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Resources</span>.<span class="ruby-identifier">new</span>)
126: 
127:       <span class="ruby-identifier">target</span>.<span class="ruby-constant">Properties</span> <span class="ruby-operator">||=</span> {}
128:       <span class="ruby-identifier">target</span>.<span class="ruby-constant">Properties</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">properties</span>
129:     
130:       <span class="ruby-keyword kw">self</span>
131:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000289" class="method-detail">
        <a name="M000289"></a>

        <div class="method-heading">
          <a href="#M000289" class="method-signature">
          <span class="method-name">add_shading</span><span class="method-args">(name, shading)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000289-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000289-source">
<pre>
     <span class="ruby-comment cmt"># File origami/page.rb, line 97</span>
 97:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_shading</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">shading</span>)
 98:       <span class="ruby-identifier">target</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Resources</span>) <span class="ruby-operator">?</span> <span class="ruby-keyword kw">self</span> <span class="ruby-operator">:</span> (<span class="ruby-keyword kw">self</span>.<span class="ruby-constant">Resources</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Resources</span>.<span class="ruby-identifier">new</span>)
 99: 
100:       <span class="ruby-identifier">target</span>.<span class="ruby-constant">Shading</span> <span class="ruby-operator">||=</span> {}
101:       <span class="ruby-identifier">target</span>.<span class="ruby-constant">Shading</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">shading</span>
102:     
103:       <span class="ruby-keyword kw">self</span>
104:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000290" class="method-detail">
        <a name="M000290"></a>

        <div class="method-heading">
          <a href="#M000290" class="method-signature">
          <span class="method-name">add_xobject</span><span class="method-args">(name, xobject)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000290-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000290-source">
<pre>
     <span class="ruby-comment cmt"># File origami/page.rb, line 106</span>
106:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_xobject</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">xobject</span>)
107:       <span class="ruby-identifier">target</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Resources</span>) <span class="ruby-operator">?</span> <span class="ruby-keyword kw">self</span> <span class="ruby-operator">:</span> (<span class="ruby-keyword kw">self</span>.<span class="ruby-constant">Resources</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Resources</span>.<span class="ruby-identifier">new</span>)
108: 
109:       <span class="ruby-identifier">target</span>.<span class="ruby-constant">XObject</span> <span class="ruby-operator">||=</span> {}
110:       <span class="ruby-identifier">target</span>.<span class="ruby-constant">XObject</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">xobject</span>
111:     
112:       <span class="ruby-keyword kw">self</span>
113:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>